import React from "react";
import { Radio } from "../../designer-shadcn/packages/formily-shadcn/src";
import { createForm } from "../../designer-shadcn/packages/formily-core/src";
import {
  FormProvider,
  createSchemaField,
} from "../../designer-shadcn/packages/formily-react/src";

const SchemaField = createSchemaField({
  components: {
    Radio,
  },
});

const form = createForm();

const FormilyAntdV5: React.FC = () => {
  return (
    <FormProvider form={form}>
      <SchemaField>
        <SchemaField.Void name="radio" x-component="Div">
          <SchemaField.Object
            name="radio"
            x-component="Radio"
            x-component-props={{
              title: "字符串数组",
            }}
          />
        </SchemaField.Void>
      </SchemaField>
    </FormProvider>
  );
};

export default FormilyAntdV5;
